<template>
  <div>
    <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
    <el-col :span="24">
      <div class="grid-content bg-purple-light">
        <div class="div-carousel">
          <el-carousel height="500px" style="width: 1000px">
            <el-carousel-item v-for="item in imgList" :key="item.value">
              <img
                :src="item.src"
                style="height: 100%; width: 100%"
                alt="图片丢失了"
              />
            </el-carousel-item>
          </el-carousel>
        </div>
      </div>
    </el-col>
    <el-col :span="4"><div class="grid-content bg-purple"></div></el-col>
  </div>
</template>

<script>
export default {
  name: "userHome",
  data() {
    return {
      imgList: [
        { src: require("@/assets/img1.png") },
        { src: require("@/assets/img2.png") },
        { src: require("@/assets/img3.png") },
        { src: require("@/assets/img4.png") },
      ],
    };
  },
};
</script>

<style scoped>
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 150px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
.div-carousel {
  width: 1000px;
  margin: 0 auto;
}
</style>
